﻿using System;
using System.Linq;
namespace WhittleList.Bll
{
    public interface ISiteRepository
    {
        void SaveChanges(User currentUser);
        void Insert(UserProjectRole projectRole);
        void Insert(Project project);
        void Insert(Site site);
        void Insert(Section section);
        void Insert(Item item);
        IQueryable<Item> Item_GetByAllBySectionId(int sectionId);
        Item Item_GetById(int id);
        IQueryable<Project> Project_GetAllBySite(Site site);
        IQueryable<Project> Project_GetAllBySiteId(int siteId);
        IQueryable<Project> Project_GetAllByUser(User user, bool? approved);
        IQueryable<Project> Project_GetAllByUserId(int userId, bool? approved);
        IQueryable<User> Project_GetAllUsersByProjectId(int projectId, bool? approved);
        Project Project_GetById(int id);
        IQueryable<Section> Section_GetAllByProjectId(int projectId);
        Section Section_GetById(int id);
        IQueryable<Site> Site_GetAllByOwner(User owner);
        IQueryable<Site> Site_GetAllByOwnerId(int id);
        Site Site_GetById(int id);
        Site Site_GetByUrl(string url);
        Site Site_GetByName(string name);
        bool UserHasRole(User user, Site site);

    }
}
